import koaRouter from "koa-router";
import {injectRouter, IRouteOption} from "../utils/util";
import * as test from "../controllers/test";
import { aimorning } from "../controllers/intelligent";

const router = new koaRouter();

const commonPrefix = '/openapi/v1';

const routeOptions: Array<IRouteOption> = [
  {
    prefix: commonPrefix,
    path: '/test',
    method: 'get',
    handlers: test
  },
  {
    prefix: commonPrefix,
    path: '/intelligent',
    method: 'post',
    handlers: {aimorning}
  }
]

injectRouter(router, routeOptions);

export default router;
